<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
{{assign var="title" value='文件'}}
{{assign var="app" value='file'}}
{{assign var="act" value='index'}}
{{assign var="td" value='4'}}
<title>{{$title}}管理 - {{'admin|admin_site_name'|C|default:'后台管理'}}</title>
{{include file="include/base.html"}}
</head>
<body>

{{include file="include/sidebar.html"}}

<div class="body_right">
	<div id="content">
	
	<div class="search">
	<form name='search' class="router" action="index.php" method="get">
	<input type="hidden" name="app" value="{{$app}}"/>
	<ul class="bread">
		<li>
			<a class="btn" href="{{$smarty.const.__ROOT__}}index.php?app=file&active_path={{$up_path}}"><i class="icon-arrow-up"></i>上级目录</a>
			<span>当前目录：{{$active_path}}</span>
		</li>
	</ul>
	</form>
	</div>

	<form name='form' action="{{$smarty.const.__ROOT__}}index.php?app={{$app}}" method="post">
	<input type="hidden" name="app" value="{{$app}}"/>
	<input type="hidden" name="act" value=""/>
	<input type="hidden" name="table" value="{{$table}}"/>
	<table class="table table-bordered">
		<tr class="thead">
		  <td colspan="{{$td}}">
		  <div class="floatr">
			<a class="btn" href="{{$smarty.const.__ROOT__}}index.php?app=file" title="浏览文件"><i class="icon-home"></i>根目录</a>
			<a class="btn iframe" title="新建文件" height="550" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=create&type=file&file={{$active_path}}&iframe=true"><i class="icon-file"></i>新建文件</a>
			<a class="btn iframe" title="新建目录" height="230" width="600" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=create&type=dir&file={{$active_path}}&iframe=true"><i class="icon-folder-open"></i>新建目录</a>
			<a class="btn iframe" title="文件上传" height="300" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=upload&file={{$active_path}}&iframe=true"><i class="icon-upload"></i>文件上传</a>
			<a class="btn iframe" title="空间检查" height="150" width="500" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=space&file={{$active_path}}&iframe=true"><i class="icon-eye-open"></i>空间检查</a>
		  </div>
		  ◆ {{$title}}管理 －> {{$title}}列表 <<span>共{{$list|@count}}个对象</span>>
		  </td>
		</tr>
		{{if !$result}}
		<tr class="noline"><td colspan="{{$td}}" class="result_empty"></td></tr>
		{{else}}
		<tr class="ttitle">
			<th>文件名</th>
			<th>文件大小</th>
			<th>最后修改时间</th>
			<th>操作</th>
		</tr>
		<tbody>
			{{section name=loop loop=$list}}
			<tr target="id" rel="{{$list[loop].id}}">
				<td>
				{{if $list[loop].img eq 'dir'}}
				<a class="btn" href="{{$smarty.const.__ROOT__}}index.php?app=file&active_path={{$list[loop].active_path}}" title="浏览文件"><i class="icon-folder-open"></i>{{$list[loop].name}}</a>
				{{else}}
				<i class="icon-file"></i>{{$list[loop].name}}
				{{/if}}
				</td>
				<td>{{$list[loop].size}}</td>
				<td>{{$list[loop].date}}</td>
				<td>
					{{if $list[loop].edit eq 1}}
					<a class="btn iframe" title="编辑文件" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=edit&file={{$list[loop].active_path|encode}}&iframe=true"><i class="icon-edit"></i>编辑</a>
					{{/if}}
					<a class="btn iframe" title="更改名称" height="300" width="600" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=rename&file={{$list[loop].active_path|encode}}&iframe=true"><i class="icon-pencil"></i>改名</a>
					{{if $list[loop].img neq 'dir'}}
					<a class="btn iframe" title="移动文件" height="310" width="600" href="{{$smarty.const.__ROOT__}}index.php?app=file&act=move&file={{$list[loop].active_path|encode}}&iframe=true"><i class="icon-share-alt"></i>移动</a>
					{{/if}}
					<a class="btn ajaxSubmit refresh confirm btn-danger" title="删除将不可恢复,确定要删除吗?" link="{{$smarty.const.__ROOT__}}index.php?app=file&act=delete&file={{$list[loop].active_path|encode}}"><i class="icon-trash icon-white"></i>删除</a>
				</td>
			</tr>
		    {{/section}}
			<tr class="thead">
			  <td colspan="{{$td}}">
				{{include file="include/page.html"}}
			  </td>
			</tr>
		</tbody>
		{{/if}}
	</table>
	</form>
</div>
</div>

</body>
</html>